package day05.StringBuiders;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/26
 */
public class Test5 {
    public static void main(String[] args) {
        String[] strs = {"abc", "aba", "abba", "aaa", "mnanm"};
        for (String str :  strs) {
            System.out.println(str + " 是否对称: " + Sym(str));
        }
    }

    public static boolean Sym(String str) {
        StringBuilder reversed = new StringBuilder(str).reverse();
        return str.equals(reversed.toString());
    }
}
